home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1997 February / macformat-047.iso / Demos / Picasso Interactive Demo / Data / Sequence / Sequence.Dxr / Internal_11_Sc. QTVR.ls < prev    next >
Encoding:
Text File  |  1996-12-02  |  1.5 KB  |  58 lines

  1. on gestionQTVRMarc
  2.   global gCurseurPointerSeq, gCurseurLoupeInSeq, gCurseurDoigtSeq, gCurseurFlecheGaucheSeq, gCurseurFlecheDroiteSeq, gNumSpriteVideo, gTypeSpriteVideo, movieName, nbi, gType
  3.   set nomQTVR to the name of the member of sprite gNumSpriteVideo
  4.   if nomQTVR = "Panorama.QTV" then
  5.     set factor to 20
  6.   else
  7.     set factor to 2
  8.   end if
  9.   set nbi to the duration of member nomQTVR
  10.   set orgx to the mouseH
  11.   repeat while the mouseDown = 1
  12.     set x to the mouseH
  13.     if x < orgx then
  14.       Leftrotate((orgx - x) / factor)
  15.       cursor(gCurseurFlecheGaucheSeq)
  16.     else
  17.       if x > orgx then
  18.         Rightrotate((x - orgx) / factor)
  19.         cursor(gCurseurFlecheDroiteSeq)
  20.       end if
  21.     end if
  22.     if nomQTVR <> "Panorama.QTV" then
  23.       set orgx to x
  24.     end if
  25.     updateStage()
  26.   end repeat
  27. end
  28.  
  29. on Leftrotate speed
  30.   global movieName, nbi, gNumSpriteVideo, gScrollQTRV360
  31.   set cui to the movieTime of sprite gNumSpriteVideo
  32.   if (cui + speed) > nbi then
  33.     if gScrollQTRV360 = 1 then
  34.       set cui to cui + speed - nbi
  35.     else
  36.       set cui to nbi
  37.     end if
  38.   else
  39.     set cui to cui + speed
  40.   end if
  41.   set the movieTime of sprite gNumSpriteVideo to cui
  42. end
  43.  
  44. on Rightrotate speed
  45.   global movieName, nbi, movieprop, gNumSpriteVideo, gScrollQTRV360
  46.   set cui to the movieTime of sprite gNumSpriteVideo
  47.   if (cui - speed) < 0 then
  48.     if gScrollQTRV360 = 1 then
  49.       set cui to cui - speed + nbi
  50.     else
  51.       set cui to 0
  52.     end if
  53.   else
  54.     set cui to cui - speed
  55.   end if
  56.   set the movieTime of sprite gNumSpriteVideo to cui
  57. end
  58.